import java.util.Comparator;
import java.util.PriorityQueue;
class inum implements Comparator<Integer>
{

    @Override
    public int compare(Integer o1, Integer o2) {
        return o2.compareTo(o1);
    }
}

public class text
{


    public static void main2(String[] args) {
        PriorityQueue<Integer> a=new PriorityQueue<>(new Comparator<Integer>() {
            @Override
            public int compare(Integer o1, Integer o2) {
                return o2.compareTo(o1);
            }
        });

    }


    public static void main1(String[] args) {
        PriorityQueue<Integer> a=new PriorityQueue<>(new inum());
        a.offer(10);
        a.offer(20);
        a.offer(30);
        System.out.println(a.poll());
    }
}
